<!DOCTYPE html>
<html>
<head>
    <title>JNI 命令执行</title>
    <script>
        async function executeCommand() {
            const command = document.getElementById("command").value;
            const response = await fetch('/jnidemo/jni/runCommand', {
                method: 'POST',
                headers: {
                    'Content-Type': 'text/plain'
                },
                body: command
            });
            const result = await response.text();
            document.getElementById("result").innerText = result;
        }
    </script>
</head>
<body>
<h1>JNI Command Executor</h1>
<input type="text" id="command" placeholder="Enter command" value="calc"/>
<button onclick="executeCommand()">Execute</button>
<h2>Result:</h2>
<pre id="result"></pre>
</body>
</html>
